package 力扣.贪心;

public class 零钱兑换_acw677 {
    public int coinChange(int[] coins, int amount) {
        if (coins == null || coins.length == 0){
            return 0;
        }
        int ans = 0;
        int N = coins.length;
        for (int i = N - 1; i >= 0 ; i--) {
            ans += amount / coins[i];
            amount %= coins[i];
        }
        return  ans;
    }
}
